package br.com.ctm.advogadope.constraints;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

/**
 * Anotação utilizada para validação de campo CEP.
 * @author Cleber
 *
 */
@Constraint(validatedBy = CepValidator.class)
@Documented
@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
public @interface Cep {

	String message() default "Cep inválido";

	Class<?>[] groups() default {};

	Class<? extends Payload>[] payload() default {};

}